/*//. class OpenALSource
  ../ Objects representing points in 3D space to emit sounds. .//*/

typedef struct _obj_openal_src_s {
	zend_object std;

	ALuint src;
	zval *zbuffer;
	
} obj_openal_source_s;

typedef struct _obj_openal_srcprop_s {
	int prop;
	int type;
	int size;
} obj_openal_source_prop_s;

PHP_METHOD(OpenALSource, __construct);

PHP_METHOD(OpenALSource, play);
PHP_METHOD(OpenALSource, stop);
PHP_METHOD(OpenALSource, pause);
PHP_METHOD(OpenALSource, rewind);
PHP_METHOD(OpenALSource, free);

zend_object_value obj_openal_source_new(zend_class_entry * TSRMLS_DC);
zend_object_value obj_openal_source_mknew(zend_class_entry *, obj_openal_source_s ** TSRMLS_DC);
void obj_openal_source_clone(void *, void ** TSRMLS_DC);
void obj_openal_source_free(void * TSRMLS_DC);

//. magical property handlers.
void obj_openal_source_choose_property(const char *, obj_openal_source_prop_s *);
zval * obj_openal_source_read_property(zval *,zval *,int TSRMLS_DC);
void obj_openal_source_write_property(zval *,zval *,zval * TSRMLS_DC);

zend_class_entry *openalsource_ce;
zend_object_handlers obj_openal_source_handlers;

static zend_function_entry openalsource_functions[] = {
	PHP_ME(OpenALSource, __construct, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
	PHP_ME(OpenALSource, play, NULL, ZEND_ACC_PUBLIC)
	PHP_ME(OpenALSource, stop, NULL, ZEND_ACC_PUBLIC)
	PHP_ME(OpenALSource, pause, NULL, ZEND_ACC_PUBLIC)
	PHP_ME(OpenALSource, rewind, NULL, ZEND_ACC_PUBLIC)
	PHP_ME(OpenALSource, free, NULL, ZEND_ACC_PUBLIC)
	{NULL, NULL, NULL}
};
